#include "pcaphandle.h"
#include <QDebug>

CPCapHandle::CPCapHandle(QObject *parent) :
    QObject(parent), m_snaplen(65536), m_timeout(1000)
{
    qDebug("[CPCapHandle]constructed");
}

CPCapHandle::~CPCapHandle()
{
    qDebug("[CPCapHandle]destroyed");
}

QString CPCapHandle::source() const
{
    return m_source;
}

void CPCapHandle::setSource(const QString &source)
{
    m_source = source;
    emit sourceChanged();
}

QString CPCapHandle::snaplen() const
{
    return m_snaplen;
}

void CPCapHandle::setSnaplen(const QString &snaplen)
{
    m_snaplen = snaplen;
    emit snaplenChanged();
}

QString CPCapHandle::timeout() const
{
    return m_timeout;
}

void CPCapHandle::setTimeout(const QString &timeout)
{
    m_timeout = timeout;
    emit timeoutChanged();
}

CPCapAuth *CPCapHandle::author() const
{
    return m_author;
}

void CPCapHandle::setAuthor(CPCapAuth *author)
{
    m_author = author;
    emit authorChanged();
}
